class AccessDemo
 {
	
	 protected  int x = 34;
	 public  void showDemo()
	{
		
		System.out.println("The variable value is " + x);
	}
}
 
class ChildAccess extends AccessDemo
{
	int y=36;
	public void showDemo()
	{	
		super.showDemo();
		System.out.println("The variable value is " + y);
		System.out.println("The variable value is " + x);
	}
	// child class which inherits
	// the properties of AccessDemo class
}
 
public class AccessExample
 {
 
	public static void main(String[] args)
	{
		
		ChildAccess ca = new ChildAccess();
		//AccessDemo ac=new AccessDemo();
		ca.showDemo();		// run properly
		//ChildAccess.showDemo();
		ca.y = ca.x = 45;
		System.out.println("The variable value is " +ca.y);
		//ca.x = 45; // run properly
		System.out.println("The variable value is " +ca.x);
	} 
}	